#include <stdio.h>

// typedef void (*say)(const char *words);

// interface
typedef struct animal {
    void (*eat)(struct animal *p, const char *food);
} Animal;

typedef struct dog {
    Animal ani;
} Dog;

typedef struct cat {
    Animal ani;
} Cat;

int main()
{
    size_t sz = 0;

    sz = sizeof(Animal);
    printf("sizeof ani is %zu\n", sz);

    sz = sizeof(Dog);
    printf("sizeof dog is %zu\n", sz);

    sz = sizeof(Cat);
    printf("sizeof cat is %zu\n", sz);

    return 0;
}
